package com.hl.toolkit.server.tycoin.setting.slaveservice;

import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.common.service.AbstractService;
import com.tycoin.setting.slaveentity.TycoinSysArea;
import com.tycoin.setting.slaverepository.TycoinSysAreaRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(value = "slaveTransactionManager", readOnly = true)
public class TycoinSysAreaService   extends AbstractService<TycoinSysArea, Long> {

	@Autowired
	private TycoinSysAreaRepository tycoinSysAreaRepository;
	
	
	@Override
	public AbstractRepository<TycoinSysArea, Long> getRepository() {
 		return tycoinSysAreaRepository;
	}

	public List<TycoinSysArea> findAllProvince() {
		return tycoinSysAreaRepository.findAllProvince();
	}
	
	public List<TycoinSysArea> findCityBycode(String areaCode) {
		return tycoinSysAreaRepository.findCityBycode(areaCode);
	}
	 
 
	public List<TycoinSysArea> findAreaBycode(String areaCode) {
		return tycoinSysAreaRepository.findAreaBycode(areaCode);
	}
	
 
 
 
	
	
	

}
